package game.leon.war;

import game.leon.war.node.WarNode;
import org.apache.log4j.Logger;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * User: bianpeng
 * Date: 12-1-9
 */
public class NodeMain {
    public static void main(String[] args) {
        Logger logger = Logger.getLogger(NodeMain.class);
        ApplicationContext context = new ClassPathXmlApplicationContext(new String[]{
                "war-node-context.xml"
        });
        WarNode node = context.getBean(WarNode.class);
        node.start();
        ((AbstractApplicationContext)context).registerShutdownHook();
    }
}
